Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support repr(simd) on ADTs containing a single array field #63531

Closed
wants to merge 13 commits into from

Conversation

gnzlbg
Copy link
Contributor

@gnzlbg gnzlbg commented Aug 13, 2019

This PR allows using #[repr(simd)] on ADTs containing a
single array field:

 #[repr(simd)] struct S0([f32; 4]);
 #[repr(simd)] struct S1<const N: usize>([f32; N]);
 #[repr(simd)] struct S2<T, const N: usize>([T; N]);

This should allow experimenting with portable packed SIMD
abstractions on nightly that make use of const generics.

It also has a fly-by cleanup that removes simd_type and simd_size methods.

r? @eddyb

@rust-highfive
Copy link
Collaborator

Some changes occurred in diagnostic error codes

cc @GuillaumeGomez

@rust-highfive rust-highfive added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Aug 13, 2019
for fi in &def.non_enum_variant().fields {
if fi.ty(tcx, substs) != f0_ty {
tcx.sess.fatal(&format!(
"monomorphising heterogeneous SIMD type `{}`", ty
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Are these new post-monomorphization errors... if so, why that?

Copy link
Contributor Author

@gnzlbg gnzlbg Aug 13, 2019

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not really, typeck errors before any of these can trigger, at least, as long as everything is correct there.

I added these to help during development. If typeck fails to error, an error here is better than an error down the line. That's why these are ICEs instead of something nicer.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Alright; this sounds good. Could you add comments to the places where you added these .fatal errors noting that these should be caught in typeck?

(Also, why isn't bug!(...) being used for ICEs here?)

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

(Also, why isn't bug!(...) being used for ICEs here?)

No idea, the code was using fatal error for ICES already so I just also used that - the existing fatal error even has a test..

Could you add comments to the places where you added these .fatal errors noting that these should be caught in typeck?

Sure.

Copy link
Contributor Author

@gnzlbg gnzlbg Aug 13, 2019

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

So i've done that.

The already existing error that fails if the element type isn't a machine type is currently not caught in typeck (this was already the case), and can fail if a generic SIMD vector is instantiated with an inappropriate element type. The way this is handled is that libcore should have a trait that bounds the accepted types so that this cannot happen (these features are all perma unstable).

There is a new monomorphization type error here now that we support generic lengths, and that's if the length passed to the vector is zero. We can only catch this once we know the actual value of the vector length, which right now is only at monomorphization time.

Either libcore would bound the length of the vector, once we have bounds for const generics, or we should start accepting zero-element vectors (I don't see a reason to forbid this), but that is probably better done in a different PR.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@Centril so is this issue resolved?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I leave that to @eddyb -- the only thing I would note is that we don't want to add new monomorphization errors in stable but such a consideration seems far off since this is just for experimentation.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There is a huge difference between monomorphization time errors that affect Rust users, and adding code to catch logic errors in rustc early.

I regularly get LLVM errors when using Rust. Their output is completely useless, and the first step into debugging those is requiring users to re-compile a Rust toolchain with LLVM assertions enabled, and debugging back to Rust from there.

I'd much rather have a monomorphization time error just saying "This generic intrinsics does not support that type", and wish others would as well.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think I know what needs to be cleared up: the fatal was moved from one place to another, it's not new (AFAIK).

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@gnzlbg I think you misunderstood me; I was making a general remark about user exposed monmorphization time errors, not internal ones for intrinsics... so we should be good.

@gnzlbg gnzlbg force-pushed the array_simd branch 4 times, most recently from 9f77ec4 to c9d6e43 Compare August 13, 2019 19:43
This PR allows using `#[repr(simd)]` on ADTs containing a
single array field:

```rust
 #[repr(simd)] struct S0([f32; 4]);
 #[repr(simd)] struct S1<const N: usize>([f32; N]);
 #[repr(simd)] struct S2<T, const N: usize>([T; N]);
```

This should allow experimenting with portable packed SIMD
abstractions on nightly that make use of const generics.
@rust-highfive
Copy link
Collaborator

The job x86_64-gnu-llvm-6.0 of your PR failed (raw log). Through arcane magic we have determined that the following fragments from the build log may contain information about the problem.

Click to expand the log.
2019-08-13T19:52:12.1000544Z ##[command]git remote add origin https://github.com/rust-lang/rust
2019-08-13T19:52:12.1193740Z ##[command]git config gc.auto 0
2019-08-13T19:52:12.1269911Z ##[command]git config --get-all http.https://github.com/rust-lang/rust.extraheader
2019-08-13T19:52:12.1335282Z ##[command]git config --get-all http.proxy
2019-08-13T19:52:12.1489312Z ##[command]git -c http.extraheader="AUTHORIZATION: basic ***" fetch --force --tags --prune --progress --no-recurse-submodules --depth=2 origin +refs/heads/*:refs/remotes/origin/* +refs/pull/63531/merge:refs/remotes/pull/63531/merge
---
2019-08-13T19:52:48.5197821Z do so (now or later) by using -b with the checkout command again. Example:
2019-08-13T19:52:48.5197874Z 
2019-08-13T19:52:48.5198116Z   git checkout -b <new-branch-name>
2019-08-13T19:52:48.5198147Z 
2019-08-13T19:52:48.5198211Z HEAD is now at 25db08dd5 Merge 3773bcf6ee32ff432c67583172342a14ba8e475b into 60960a260f7b5c695fd0717311d72ce62dd4eb43
2019-08-13T19:52:48.5366490Z ##[section]Starting: Collect CPU-usage statistics in the background
2019-08-13T19:52:48.5369262Z ==============================================================================
2019-08-13T19:52:48.5369351Z Task         : Bash
2019-08-13T19:52:48.5369396Z Description  : Run a Bash script on macOS, Linux, or Windows
---
2019-08-13T19:58:51.6829528Z    Compiling serde_json v1.0.40
2019-08-13T19:58:56.0753775Z    Compiling tidy v0.1.0 (/checkout/src/tools/tidy)
2019-08-13T19:59:04.9003319Z     Finished release [optimized] target(s) in 1m 31s
2019-08-13T19:59:04.9081120Z tidy check
2019-08-13T19:59:05.6884325Z tidy error: /checkout/src/test/codegen/simd-intrinsic/simd-intrinsic-transmute-array.rs:15: line longer than 100 chars
2019-08-13T19:59:05.6889811Z tidy error: /checkout/src/test/codegen/simd-intrinsic/simd-intrinsic-transmute-array.rs:16: line longer than 100 chars
2019-08-13T19:59:06.9049290Z some tidy checks failed
2019-08-13T19:59:06.9056334Z 
2019-08-13T19:59:06.9056334Z 
2019-08-13T19:59:06.9058102Z command did not execute successfully: "/checkout/obj/build/x86_64-unknown-linux-gnu/stage0-tools-bin/tidy" "/checkout/src" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage0/bin/cargo" "--no-vendor"
2019-08-13T19:59:06.9058650Z 
2019-08-13T19:59:06.9058792Z 
2019-08-13T19:59:06.9062971Z failed to run: /checkout/obj/build/bootstrap/debug/bootstrap test src/tools/tidy
2019-08-13T19:59:06.9063253Z Build completed unsuccessfully in 0:01:34
2019-08-13T19:59:06.9063253Z Build completed unsuccessfully in 0:01:34
2019-08-13T19:59:08.1965877Z ##[error]Bash exited with code '1'.
2019-08-13T19:59:08.2009757Z ##[section]Starting: Checkout
2019-08-13T19:59:08.2011465Z ==============================================================================
2019-08-13T19:59:08.2011540Z Task         : Get sources
2019-08-13T19:59:08.2011586Z Description  : Get sources from a repository. Supports Git, TfsVC, and SVN repositories.

I'm a bot! I can only do what humans tell me to, so if this was not helpful or you have suggestions for improvements, please ping or otherwise contact @TimNN. (Feature Requests)

@rust-highfive
Copy link
Collaborator

The job x86_64-gnu-llvm-6.0 of your PR failed (raw log). Through arcane magic we have determined that the following fragments from the build log may contain information about the problem.

Click to expand the log.
2019-08-14T05:14:52.2880722Z ##[command]git remote add origin https://github.com/rust-lang/rust
2019-08-14T05:14:52.3061265Z ##[command]git config gc.auto 0
2019-08-14T05:14:52.3131400Z ##[command]git config --get-all http.https://github.com/rust-lang/rust.extraheader
2019-08-14T05:14:52.3189530Z ##[command]git config --get-all http.proxy
2019-08-14T05:14:52.3334863Z ##[command]git -c http.extraheader="AUTHORIZATION: basic ***" fetch --force --tags --prune --progress --no-recurse-submodules --depth=2 origin +refs/heads/*:refs/remotes/origin/* +refs/pull/63531/merge:refs/remotes/pull/63531/merge
---
2019-08-14T05:15:27.9477828Z do so (now or later) by using -b with the checkout command again. Example:
2019-08-14T05:15:27.9478042Z 
2019-08-14T05:15:27.9478470Z   git checkout -b <new-branch-name>
2019-08-14T05:15:27.9478660Z 
2019-08-14T05:15:27.9481265Z HEAD is now at 1aea4b90d Merge 58fe6835bdc1ddb80a3be81872c7f5759f4eda3c into 60960a260f7b5c695fd0717311d72ce62dd4eb43
2019-08-14T05:15:27.9635804Z ##[section]Starting: Collect CPU-usage statistics in the background
2019-08-14T05:15:27.9638244Z ==============================================================================
2019-08-14T05:15:27.9638296Z Task         : Bash
2019-08-14T05:15:27.9638338Z Description  : Run a Bash script on macOS, Linux, or Windows
---
2019-08-14T06:19:10.5615259Z .................................................................................................... 1300/8876
2019-08-14T06:19:17.3504606Z .................................................................................................... 1400/8876
2019-08-14T06:19:23.8537211Z .................................................................................................... 1500/8876
2019-08-14T06:19:34.9042314Z ....................................................................................i............... 1600/8876
2019-08-14T06:19:42.9846088Z i................................................................................................... 1700/8876
2019-08-14T06:19:49.9461170Z ...........................................................................iiiii.................... 1800/8876
2019-08-14T06:20:13.1756801Z .................................................................................................... 2000/8876
2019-08-14T06:20:15.7348147Z .................................................................................................... 2100/8876
2019-08-14T06:20:18.5233328Z .................................................................................................... 2200/8876
2019-08-14T06:20:26.6186441Z .................................................................................................... 2300/8876
---
2019-08-14T06:24:29.7170595Z .................................................................................................... 5300/8876
2019-08-14T06:24:37.3203614Z ........i........................................................................................... 5400/8876
2019-08-14T06:24:43.0720713Z .................................................................................................... 5500/8876
2019-08-14T06:24:55.8306374Z .................................................................................................... 5600/8876
2019-08-14T06:25:13.0171616Z ...ii...i..ii...........i........................................................................... 5700/8876
2019-08-14T06:25:40.6819407Z .................................................................................................... 5900/8876
2019-08-14T06:25:46.5627180Z .................................................................................................... 6000/8876
2019-08-14T06:25:46.5627180Z .................................................................................................... 6000/8876
2019-08-14T06:26:01.7426334Z ....i..ii........................................................................................... 6100/8876
2019-08-14T06:26:22.4832905Z ...............................................i.................................................... 6300/8876
2019-08-14T06:26:24.8323485Z .................................................................................................... 6400/8876
2019-08-14T06:26:27.5863667Z ...................i................................................................................ 6500/8876
2019-08-14T06:26:32.6156389Z .................................................................................................... 6600/8876
---
2019-08-14T06:31:27.6528510Z  finished in 23.339
2019-08-14T06:31:27.6723546Z Check compiletest suite=codegen mode=codegen (x86_64-unknown-linux-gnu -> x86_64-unknown-linux-gnu)
2019-08-14T06:31:27.8386232Z 
2019-08-14T06:31:27.8387050Z running 148 tests
2019-08-14T06:31:31.2118748Z i....iii......iii..iiii....i............................i..i................i....i.........ii.i.i..i 100/148
2019-08-14T06:31:33.2199075Z iii..............i......F..F.iii.i......ii......
2019-08-14T06:31:33.2203807Z 
2019-08-14T06:31:33.2204284Z ---- [codegen] codegen/simd-intrinsic/simd-intrinsic-generic-extract-insert.rs stdout ----
2019-08-14T06:31:33.2204882Z 
2019-08-14T06:31:33.2205964Z error: compilation failed!
2019-08-14T06:31:33.2205964Z error: compilation failed!
2019-08-14T06:31:33.2206027Z status: exit code: 101
2019-08-14T06:31:33.2207242Z command: "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/bin/rustc" "/checkout/src/test/codegen/simd-intrinsic/simd-intrinsic-generic-extract-insert.rs" "-Zthreads=1" "--target=x86_64-unknown-linux-gnu" "-C" "prefer-dynamic" "--out-dir" "/checkout/obj/build/x86_64-unknown-linux-gnu/test/codegen/simd-intrinsic/simd-intrinsic-generic-extract-insert" "-Crpath" "-O" "-Cdebuginfo=0" "-Zunstable-options" "-Lnative=/checkout/obj/build/x86_64-unknown-linux-gnu/native/rust-test-helpers" "-C" "no-prepopulate-passes" "-L" "/checkout/obj/build/x86_64-unknown-linux-gnu/test/codegen/simd-intrinsic/simd-intrinsic-generic-extract-insert/auxiliary" "--emit=llvm-ir"
2019-08-14T06:31:33.2207724Z ------------------------------------------
2019-08-14T06:31:33.2207782Z 
2019-08-14T06:31:33.2208038Z ------------------------------------------
2019-08-14T06:31:33.2208089Z stderr:
2019-08-14T06:31:33.2208089Z stderr:
2019-08-14T06:31:33.2208332Z ------------------------------------------
2019-08-14T06:31:33.2208678Z thread 'rustc' panicked at 'internal error: entered unreachable code', src/librustc/ty/layout.rs:749:25
2019-08-14T06:31:33.2208787Z 
2019-08-14T06:31:33.2208855Z error: internal compiler error: unexpected panic
2019-08-14T06:31:33.2208889Z 
2019-08-14T06:31:33.2208939Z note: the compiler unexpectedly panicked. this is a bug.
2019-08-14T06:31:33.2208939Z note: the compiler unexpectedly panicked. this is a bug.
2019-08-14T06:31:33.2208981Z 
2019-08-14T06:31:33.2209671Z note: we would appreciate a bug report: ***/blob/master/CONTRIBUTING.md#bug-reports
2019-08-14T06:31:33.2210020Z note: rustc 1.38.0-dev running on x86_64-unknown-linux-gnu
2019-08-14T06:31:33.2210078Z 
2019-08-14T06:31:33.2210078Z 
2019-08-14T06:31:33.2210410Z note: compiler flags: -Z threads=1 -Z unstable-options -C prefer-dynamic -C rpath -C debuginfo=0 -C no-prepopulate-passes
2019-08-14T06:31:33.2210482Z 
2019-08-14T06:31:33.2210751Z ------------------------------------------
2019-08-14T06:31:33.2210786Z 
2019-08-14T06:31:33.2210816Z 
2019-08-14T06:31:33.2210816Z 
2019-08-14T06:31:33.2211106Z ---- [codegen] codegen/simd-intrinsic/simd-intrinsic-transmute-array.rs stdout ----
2019-08-14T06:31:33.2211162Z 
2019-08-14T06:31:33.2211207Z error: compilation failed!
2019-08-14T06:31:33.2211256Z status: exit code: 101
2019-08-14T06:31:33.2212954Z command: "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/bin/rustc" "/checkout/src/test/codegen/simd-intrinsic/simd-intrinsic-transmute-array.rs" "-Zthreads=1" "--target=x86_64-unknown-linux-gnu" "-C" "prefer-dynamic" "--out-dir" "/checkout/obj/build/x86_64-unknown-linux-gnu/test/codegen/simd-intrinsic/simd-intrinsic-transmute-array" "-Crpath" "-O" "-Cdebuginfo=0" "-Zunstable-options" "-Lnative=/checkout/obj/build/x86_64-unknown-linux-gnu/native/rust-test-helpers" "-C" "no-prepopulate-passes" "-L" "/checkout/obj/build/x86_64-unknown-linux-gnu/test/codegen/simd-intrinsic/simd-intrinsic-transmute-array/auxiliary" "--emit=llvm-ir"
2019-08-14T06:31:33.2213444Z ------------------------------------------
2019-08-14T06:31:33.2213485Z 
2019-08-14T06:31:33.2213738Z ------------------------------------------
2019-08-14T06:31:33.2213787Z stderr:
2019-08-14T06:31:33.2213787Z stderr:
2019-08-14T06:31:33.2214051Z ------------------------------------------
2019-08-14T06:31:33.2214370Z thread 'rustc' panicked at 'internal error: entered unreachable code', src/librustc/ty/layout.rs:749:25
2019-08-14T06:31:33.2214614Z 
2019-08-14T06:31:33.2214664Z error: internal compiler error: unexpected panic
2019-08-14T06:31:33.2214697Z 
2019-08-14T06:31:33.2214746Z note: the compiler unexpectedly panicked. this is a bug.
2019-08-14T06:31:33.2214746Z note: the compiler unexpectedly panicked. this is a bug.
2019-08-14T06:31:33.2214796Z 
2019-08-14T06:31:33.2215207Z note: we would appreciate a bug report: ***/blob/master/CONTRIBUTING.md#bug-reports
2019-08-14T06:31:33.2215556Z note: rustc 1.38.0-dev running on x86_64-unknown-linux-gnu
2019-08-14T06:31:33.2215594Z 
2019-08-14T06:31:33.2215594Z 
2019-08-14T06:31:33.2215922Z note: compiler flags: -Z threads=1 -Z unstable-options -C prefer-dynamic -C rpath -C debuginfo=0 -C no-prepopulate-passes
2019-08-14T06:31:33.2216013Z 
2019-08-14T06:31:33.2216262Z ------------------------------------------
2019-08-14T06:31:33.2216297Z 
2019-08-14T06:31:33.2216326Z 
---
2019-08-14T06:31:33.2217448Z test result: FAILED. 115 passed; 2 failed; 31 ignored; 0 measured; 0 filtered out
2019-08-14T06:31:33.2217489Z 
2019-08-14T06:31:33.2217517Z 
2019-08-14T06:31:33.2217544Z 
2019-08-14T06:31:33.2219251Z command did not execute successfully: "/checkout/obj/build/x86_64-unknown-linux-gnu/stage0-tools-bin/compiletest" "--compile-lib-path" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/lib" "--run-lib-path" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/lib/rustlib/x86_64-unknown-linux-gnu/lib" "--rustc-path" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/bin/rustc" "--src-base" "/checkout/src/test/codegen" "--build-base" "/checkout/obj/build/x86_64-unknown-linux-gnu/test/codegen" "--stage-id" "stage2-x86_64-unknown-linux-gnu" "--mode" "codegen" "--target" "x86_64-unknown-linux-gnu" "--host" "x86_64-unknown-linux-gnu" "--llvm-filecheck" "/usr/lib/llvm-6.0/bin/FileCheck" "--host-rustcflags" "-Crpath -O -Cdebuginfo=0 -Zunstable-options  -Lnative=/checkout/obj/build/x86_64-unknown-linux-gnu/native/rust-test-helpers" "--target-rustcflags" "-Crpath -O -Cdebuginfo=0 -Zunstable-options  -Lnative=/checkout/obj/build/x86_64-unknown-linux-gnu/native/rust-test-helpers" "--docck-python" "/usr/bin/python2.7" "--lldb-python" "/usr/bin/python2.7" "--gdb" "/usr/bin/gdb" "--quiet" "--llvm-version" "6.0.0\n" "--system-llvm" "--cc" "" "--cxx" "" "--cflags" "" "--llvm-components" "" "--llvm-cxxflags" "" "--adb-path" "adb" "--adb-test-dir" "/data/tmp/work" "--android-cross-path" "" "--color" "always"
2019-08-14T06:31:33.2219528Z 
2019-08-14T06:31:33.2219577Z 
2019-08-14T06:31:33.2225226Z thread 'main' panicked at 'Some tests failed', src/tools/compiletest/src/main.rs:536:22
2019-08-14T06:31:33.2225470Z note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace.
2019-08-14T06:31:33.2225470Z note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace.
2019-08-14T06:31:33.2229083Z failed to run: /checkout/obj/build/bootstrap/debug/bootstrap test
2019-08-14T06:31:33.2229157Z Build completed unsuccessfully in 1:09:30
2019-08-14T06:31:36.1517538Z ##[error]Bash exited with code '1'.
2019-08-14T06:31:36.1560770Z ##[section]Starting: Checkout
2019-08-14T06:31:36.1563336Z ==============================================================================
2019-08-14T06:31:36.1563403Z Task         : Get sources
2019-08-14T06:31:36.1563454Z Description  : Get sources from a repository. Supports Git, TfsVC, and SVN repositories.

I'm a bot! I can only do what humans tell me to, so if this was not helpful or you have suggestions for improvements, please ping or otherwise contact @TimNN. (Feature Requests)

@eddyb
Copy link
Member

eddyb commented Aug 14, 2019

cc @nagisa @rkruppe @alexcrichton

@@ -1039,6 +1039,29 @@ fn generic_simd_intrinsic(
llret_ty: &'ll Type,
span: Span
) -> Result<&'ll Value, ()> {
// Given a SIMD vector type `x` return the element type and the number of
// elements in the vector.
fn simd_type_size(bx: &Builder<'a, 'll, 'tcx>, x: Ty<'tcx>) -> (Ty<'tcx>, usize) {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

x -> ty (or simd_ty)

@@ -1761,6 +1761,7 @@ pub fn check_simd(tcx: TyCtxt<'_>, sp: Span, def_id: DefId) {
match e.sty {
ty::Param(_) => { /* struct<T>(T, T, T, T) is ok */ }
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Was this added later? It effectively invalidates the checks below...
Even more reason we should have a single #[lang = "simd"] instead of many #[repr(simd)].

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this was added at some point last year to support generic vectors.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For the time being at least we probably want to type check SIMD vectors early, e.g., #[repr(simd)] struct Foo(Vec<i32>, Vec<i32>); and #[repr(simd)] struct Bar<const N: usize>([Vec<i32>; N]); should fail to type check.

If we move to a single:

#[lang = "simd"]
struct Simd<T, const N: usize>([T; N]) where [T; N]: SomeTrait;

in the future then we might just accept anything and leave rejecting invalid inputs to SomeTrait.

@rust-highfive
Copy link
Collaborator

The job x86_64-gnu-llvm-6.0 of your PR failed (raw log). Through arcane magic we have determined that the following fragments from the build log may contain information about the problem.

Click to expand the log.
2019-08-14T15:45:17.9245251Z ##[command]git remote add origin https://github.com/rust-lang/rust
2019-08-14T15:45:17.9433573Z ##[command]git config gc.auto 0
2019-08-14T15:45:17.9517977Z ##[command]git config --get-all http.https://github.com/rust-lang/rust.extraheader
2019-08-14T15:45:17.9572922Z ##[command]git config --get-all http.proxy
2019-08-14T15:45:17.9714037Z ##[command]git -c http.extraheader="AUTHORIZATION: basic ***" fetch --force --tags --prune --progress --no-recurse-submodules --depth=2 origin +refs/heads/*:refs/remotes/origin/* +refs/pull/63531/merge:refs/remotes/pull/63531/merge
---
2019-08-14T15:45:53.2665637Z do so (now or later) by using -b with the checkout command again. Example:
2019-08-14T15:45:53.2666024Z 
2019-08-14T15:45:53.2666351Z   git checkout -b <new-branch-name>
2019-08-14T15:45:53.2666383Z 
2019-08-14T15:45:53.2666433Z HEAD is now at d3e305fa8 Merge fbe64f42f5617ab00e4d38285bd81d62c7fc5af0 into c43d03a19f326f4a323569328cc501e86eb6d22e
2019-08-14T15:45:53.2847109Z ##[section]Starting: Collect CPU-usage statistics in the background
2019-08-14T15:45:53.2850505Z ==============================================================================
2019-08-14T15:45:53.2850565Z Task         : Bash
2019-08-14T15:45:53.2850627Z Description  : Run a Bash script on macOS, Linux, or Windows
---
2019-08-14T15:51:49.8453673Z    Compiling serde_json v1.0.40
2019-08-14T15:51:54.1201617Z    Compiling tidy v0.1.0 (/checkout/src/tools/tidy)
2019-08-14T15:52:02.7147136Z     Finished release [optimized] target(s) in 1m 28s
2019-08-14T15:52:02.7225025Z tidy check
2019-08-14T15:52:03.5105371Z tidy error: /checkout/src/librustc/ty/layout.rs:775: line longer than 100 chars
2019-08-14T15:52:04.6673822Z some tidy checks failed
2019-08-14T15:52:04.6674129Z 
2019-08-14T15:52:04.6674129Z 
2019-08-14T15:52:04.6681022Z command did not execute successfully: "/checkout/obj/build/x86_64-unknown-linux-gnu/stage0-tools-bin/tidy" "/checkout/src" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage0/bin/cargo" "--no-vendor"
2019-08-14T15:52:04.6681709Z 
2019-08-14T15:52:04.6681742Z 
2019-08-14T15:52:04.6691166Z failed to run: /checkout/obj/build/bootstrap/debug/bootstrap test src/tools/tidy
2019-08-14T15:52:04.6691243Z Build completed unsuccessfully in 0:01:31
2019-08-14T15:52:04.6691243Z Build completed unsuccessfully in 0:01:31
2019-08-14T15:52:04.6746462Z == clock drift check ==
2019-08-14T15:52:04.6755815Z   local time: Wed Aug 14 15:52:04 UTC 2019
2019-08-14T15:52:04.7024085Z   network time: Wed, 14 Aug 2019 15:52:04 GMT
2019-08-14T15:52:04.7032104Z == end clock drift check ==
2019-08-14T15:52:05.9853004Z ##[error]Bash exited with code '1'.
2019-08-14T15:52:05.9883207Z ##[section]Starting: Checkout
2019-08-14T15:52:05.9884793Z ==============================================================================
2019-08-14T15:52:05.9884842Z Task         : Get sources
2019-08-14T15:52:05.9884898Z Description  : Get sources from a repository. Supports Git, TfsVC, and SVN repositories.

I'm a bot! I can only do what humans tell me to, so if this was not helpful or you have suggestions for improvements, please ping or otherwise contact @TimNN. (Feature Requests)

@rfcbot rfcbot removed the proposed-final-comment-period Proposed to merge/close by relevant subteam, see T-<team> label. Will enter FCP once signed off. label Sep 19, 2019
@rfcbot
Copy link

rfcbot commented Sep 19, 2019

🔔 This is now entering its final comment period, as per the review above. 🔔

@bors
Copy link
Contributor

bors commented Sep 26, 2019

☔ The latest upstream changes (presumably #64513) made this pull request unmergeable. Please resolve the merge conflicts.

@rfcbot
Copy link

rfcbot commented Sep 29, 2019

The final comment period, with a disposition to merge, as per the review above, is now complete.

As the automated representative of the governance process, I would like to thank the author for their work and everyone else who contributed.

The RFC will be merged soon.

@rfcbot rfcbot added finished-final-comment-period The final comment period is finished for this PR / Issue. and removed final-comment-period In the final comment period and will be merged soon unless new substantive objections are raised. labels Sep 29, 2019
@scottmcm scottmcm added S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. and removed S-waiting-on-team Status: Awaiting decision from the relevant subteam (see the T-<team> label). labels Sep 29, 2019
@scottmcm
Copy link
Member

@gnzlbg Now that the FCP's done, can you rebase please?

@JohnCSimon
Copy link
Member

Ping from triage.
@gnzlbg - please address the merge conflicts
cc: @scottmcm @eddyb
Thank you!

@JohnCSimon
Copy link
Member

Pinging again from triage.
@gnzlbg - can you please rebase and address the merge conflicts?
cc: @scottmcm @eddyb
Thank you!

@JohnCSimon
Copy link
Member

Pinging again from triage....
@gnzlbg - can you please rebase and address the merge conflicts?
cc: @scottmcm @eddyb @Centril
Thank you!

@Mark-Simulacrum
Copy link
Member

While unfortunate, unless someone picks this up and finishes the rebase, we'll likely be closing it when the next round of triage comes around. @gnzlbg -- can you provide at least some feedback or sense of timeline on when we can expect progress here? Maybe we can ask for help from someone who's familiar with this patch who can help rebase it?

@dlight
Copy link

dlight commented Oct 28, 2019

@Mark-Simulacrum :( isn't closing it a waste of review and implementation effort? This is an useful feature, all this discussion for nothing..

I petition to keep it open until it's rebased and merged

@Centril
Copy link
Contributor

Centril commented Oct 28, 2019

@dlight The PR can always be reopened when someone has the time to finish the work. For example, you could pick it up and finish it yourself.

@gnzlbg
Copy link
Contributor Author

gnzlbg commented Oct 28, 2019

I should have time to finish it this afternoon, I started rebasing a couple of time but got too many conflicts.

@JohnCSimon
Copy link
Member

Ping from triage
@gnzlbg Just letting you know this has sat idle for awhile.
Thank you!

@JohnCSimon
Copy link
Member

Ping from triage
@gnzlbg Just letting you know this has sat idle for awhile
can you please address merge conflicts
cc: @Centril @eddyb
Thank you!

@JohnCSimon
Copy link
Member

Pinging again from triage
@gnzlbg This PR has sat idle for awhile. Please address merge conflicts
cc: @Centril @eddyb
Thank you!

@JohnCSimon JohnCSimon added the S-inactive Status: Inactive and waiting on the author. This is often applied to closed PRs. label Nov 24, 2019
@JohnCSimon
Copy link
Member

Hello from triage
Unfortunately this one has sat idle for far too long and I'm marking this as inactive.
Feel free to reopen once you have the time.
@gnzlbg @dlight @eddyb @Mark-Simulacrum

@JohnCSimon JohnCSimon closed this Nov 24, 2019
Dylan-DPC-zz pushed a commit to Dylan-DPC-zz/rust that referenced this pull request Nov 17, 2020
Support repr(simd) on ADTs containing a single array field

This is a squash and rebase of `@gnzlbg's` rust-lang#63531

I've never actually written code in the compiler before so just fumbled my way around until it would build 😅

I imagine there'll be some work we need to do in `rustc_codegen_cranelift` too for this now, but might need some input from `@bjorn3` to know what that is.

cc `@rust-lang/project-portable-simd`

-----

This PR allows using `#[repr(simd)]` on ADTs containing a single array field:

```rust
 #[repr(simd)] struct S0([f32; 4]);
 #[repr(simd)] struct S1<const N: usize>([f32; N]);
 #[repr(simd)] struct S2<T, const N: usize>([T; N]);
```

This should allow experimenting with portable packed SIMD abstractions on nightly that make use of const generics.
bors added a commit to rust-lang-ci/rust that referenced this pull request Nov 29, 2020
Support repr(simd) on ADTs containing a single array field

This is a squash and rebase of `@gnzlbg's` rust-lang#63531

I've never actually written code in the compiler before so just fumbled my way around until it would build 😅

I imagine there'll be some work we need to do in `rustc_codegen_cranelift` too for this now, but might need some input from `@bjorn3` to know what that is.

cc `@rust-lang/project-portable-simd`

-----

This PR allows using `#[repr(simd)]` on ADTs containing a single array field:

```rust
 #[repr(simd)] struct S0([f32; 4]);
 #[repr(simd)] struct S1<const N: usize>([f32; N]);
 #[repr(simd)] struct S2<T, const N: usize>([T; N]);
```

This should allow experimenting with portable packed SIMD abstractions on nightly that make use of const generics.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
disposition-merge This issue / PR is in PFCP or FCP with a disposition to merge it. finished-final-comment-period The final comment period is finished for this PR / Issue. S-inactive Status: Inactive and waiting on the author. This is often applied to closed PRs. S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. T-lang Relevant to the language team, which will review and decide on the PR/issue.
Projects
None yet
Development

Successfully merging this pull request may close these issues.